package com.aidex.biz.domain;

import com.aidex.common.annotation.Excel;
import com.aidex.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * 分配规则对象 biz_push_rule
 *
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-03-11
 */
@Data
public class PushRule extends BaseEntity<PushRule> {
    private static final long serialVersionUID = 1L;

    /**
     * 名称
     */
    @Excel(name = "名称")
    @NotBlank(message = "名称不允许为空")
    private String ruleName;

    /**
     * 分配类型
     */
    @Excel(name = "分配类型", dictType = "pushrule_type")
    private String ruleType;


    /**
     * 城市名称
     */
    @Excel(name = "城市名称")
    private String ruleCities;
    /**
     * 客户来源
     */
    @Excel(name = "客户来源", dictType = "bus_type")
    private String laiyuan;

    /**
     * 标签
     */
    @Excel(name = "标签", dictType = "sys_common_status")
    private String tags;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 状态（0正常 1 停用）
     */
    @Excel(name = "状态", dictType = "sys_normal_disable")
    private String status;


    /**
     * 分配人员
     */
    private List<PushRuleUser> ruleUsers;

    /**
     * 分配逻辑
     */
    private String ruleLogic;

    /**
     * 分配类型
     */
    @Excel(name = "分配设置", dictType = "pushrule_set")
    private String ruleSet;

    /**
     * 单日最大接单量，针对所有来源
     */
    @Excel(name = "单日最大接单量")
    private Integer maxCount;

    /**
     * 是否关联临时表
     */
    private String withTemp;


    public String getRuleLogic() {
        return ruleLogic;
    }

    public void setRuleLogic(String ruleLogic) {
        this.ruleLogic = ruleLogic;
    }


    public List<PushRuleUser> getRuleUsers() {
        return ruleUsers;
    }

    public void setRuleUsers(List<PushRuleUser> ruleUsers) {
        this.ruleUsers = ruleUsers;
    }

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public String getRuleType() {
        return ruleType;
    }

    public void setRuleType(String ruleType) {
        this.ruleType = ruleType;
    }


    public String getRuleCities() {
        return ruleCities;
    }

    public void setRuleCities(String ruleCities) {
        this.ruleCities = ruleCities;
    }

    public String getLaiyuan() {
        return laiyuan;
    }

    public void setLaiyuan(String laiyuan) {
        this.laiyuan = laiyuan;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("ruleName", getRuleName())
                .append("ruleType", getRuleType())
                .append("deptId", getDeptId())
                .append("deptName", getDeptName())
                .append("companyId", getCompanyId())
                .append("cityName", getRuleCities())
                .append("laiyuan", getLaiyuan())
                .append("tags", getTags())
                .append("sort", getSort())
                .append("status", getStatus())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("remark", getRemark())
                .append("id", getId())
                .append("createBy", getCreateBy())
                .append("createDept", getCreateDept())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("updateIp", getUpdateIp())
                .append("version", getVersion())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
